from django.shortcuts import render
from news.models import Newsmodel
from news.ser import NewSerlizer
from rest_framework.viewsets import ModelViewSet
# Create your views here.
class NewsView(ModelViewSet):
    queryset = Newsmodel.objects.all()
    serializer_class = NewSerlizer
    lookup_field = 'pk'
    lookup_url_kwarg = 'id'